import type { RouteRecordRaw } from 'vue-router'
export const routes: Array<RouteRecordRaw> = [
    {
        //资源
        path: '/',
        redirect: '/recommend',
    },
    {
        //资源
        path: '/recommend',
        name: 'recommend',
        component: () => import('@/pages/recommend/index.vue'),
        children: [
            {
                //推荐
                path: 'recommend',
                component: () =>
                    import('@/pages/recommend/components/recommend/index.vue'),
            },
            {
                //作品
                path: 'original',
                component: () =>
                    import('@/pages/recommend/components/original/index.vue'),
            },
            {
                //教程
                path: 'course',
                component: () =>
                    import('@/pages/recommend/components/course/index.vue'),
            },
            {
                //专题
                path: 'specialTopic',
                component: () =>
                    import(
                        '@/pages/recommend/components/specialTopic/index.vue'
                    ),
            },
            {
                //动态
                path: 'information',
                component: () =>
                    import(
                        '@/pages/recommend/components/information/index.vue'
                    ),
            },
            {
                //关注
                path: 'attention',
                component: () =>
                    import('@/pages/recommend/components/attention/index.vue'),
            },
        ],
    },
    {
        //课程
        path: '/discovery',
        name: 'discovery',
        redirect: '/discovery/member',
        component: () => import('@/pages/discovery/index.vue'),
        children: [
            {
                path: 'member',
                name: 'member',
                component: () => import('@/pages/discovery/Member/index.vue'),
            },
            {
                path: 'videolesson',
                name: 'videolesson',
                component: () =>
                    import('@/pages/discovery/VideoLesson/index.vue'),
            },
            {
                path: 'live',
                name: 'live',
                component: () => import('@/pages/discovery/Live/index.vue'),
            },
            {
                path: 'theme',
                name: 'theme',
                component: () => import('@/pages/discovery/Theme/index.vue'),
            },
            {
                path: '/discovery',
                redirect: '/discovery/member',
            },
        ],
    },
    {
        // 练习室
        path: '/training',
        name: 'training',
        component: () => import('@/pages/training/index.vue'),
        // redirect:'/training/exerice',
        children: [
            {
                path: '',
                redirect: '/training/exerice',
            },
            {
                name: 'exerice',
                path: 'exerice',
                component: () => import('@/pages/training/pages/exerice.vue'),
            },
            {
                name: 'viewrecords',
                path: 'view_records',
                component: () => import('@/pages/training/pages/history.vue'),
            },
            {
                name: 'detail',
                path: '/training/detail',
                component: () => import('@/pages/training/pages/detail.vue'),
            },
        ],
    },
    {
        //交流
        path: '/communication',
        name: 'communication',
        component: () => import('@/pages/communication/index.vue'),
    },
    {
        //注册
        path: '/register',
        name: 'register',
        component: () => import('@/pages/register/index.vue'),
    },
    {
        //我的
        path: '/center',
        name: 'center',
        component: () => import('@/pages/center/index.vue'),
        redirect: '/center/resource',
        children: [
            {
                path: 'resource',
                component: () => import('@/pages/center/resource/resource.vue'),
            },
            {
                path: 'members',
                component: () => import('@/pages/center/members/members.vue'),
            },
            {
                path: 'Information',
                component: () =>
                    import('@/pages/center/information/Information.vue'),
            },
        ],
    },
    {
        //资源
        path: '/',
        redirect: '/recommend',
    },
]
